import request from '@/plugin/axios'

export function queryUsers (data) {
  return request({
    url: '/v1/user/page',
    method: 'post',
    data
  })
}

export function addUser (data) {
  return request({
    url: '/v1/user/add',
    method: 'post',
    data
  })
}

export function updateUser (id, data) {
  return request({
    url: `/v1/user/updateById/${id}`,
    method: 'post',
    data
  })
}

export function removeUser (data) {
  return request({
    url: `/v1/user/deleteByIds`,
    method: 'post',
    data
  })
}

export function getUserInfo () {
  return request({
    url: '/v1/user/queryUserInfo',
    method: 'post'
  })
}

export function saveUserInfo (data) {
  return request({
    url: '/v1/user/updateUserInfo',
    method: 'post',
    data
  })
}

export function updatePassword (data) {
  return request({
    url: '/v1/user/password',
    method: 'post',
    data
  })
}
